package com.xinqi.modules.prepare.question.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xinqi.common.mybatis.data.repo.SuperMapper;
import com.xinqi.modules.prepare.question.domain.PrepareQuestionFolderRefEntity;
import com.xinqi.modules.prepare.question.dto.req.PrepareQuestionFolderRefQueryDTO;
import com.xinqi.modules.prepare.question.dto.rsp.PrepareQuestionBankResultDTO;
import com.xinqi.modules.prepare.question.dto.rsp.PrepareQuestionFolderRefResultDTO;
import com.xinqi.modules.prepare.question.dto.rsp.QuestionTypeStatsDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 备课区试题夹关联题目数据层
 *
 * @author: system
 * @date: 2023/03/19
 */
@Mapper
public interface PrepareQuestionFolderRefMapper extends SuperMapper<PrepareQuestionFolderRefEntity> {
    Page<PrepareQuestionFolderRefResultDTO> findPage(Page<Object> page, @Param("dto") PrepareQuestionFolderRefQueryDTO query);

    IPage<PrepareQuestionBankResultDTO> questionPage(Page<Object> page, @Param("dto") PrepareQuestionFolderRefQueryDTO dto);

    List<PrepareQuestionFolderRefResultDTO> findList(@Param("dto") PrepareQuestionFolderRefQueryDTO query);

    List<QuestionTypeStatsDetail> questionStats(@Param("prepareId") Long prepareId, @Param("questionFolderId") Long c);
}
